package com.qicheng.wlhyspider.common;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@NoArgsConstructor
@Data
public class PageResult<T> implements Serializable {
    private static final long serialVersionUID = 1017457742480697773L;

    /**
     * success
     */
    private Boolean success;
    /**
     * message
     */
    private String message;
    /**
     * code
     */
    private String code;
    /**
     * result
     */
    private ResultDTO result;
    /**
     * timestamp
     */
    private Long timestamp;

    /**
     * ResultDTO
     */
    @NoArgsConstructor
    @Data
    public static class ResultDTO<T> {
        /**
         * records
         */
        private List<T> records;
        /**
         * total
         */
        private Integer total;
        /**
         * size
         */
        private Integer size;
        /**
         * current
         */
        private Integer current;
        /**
         * orders
         */
        private List<?> orders;
        /**
         * optimizeCountSql
         */
        private Boolean optimizeCountSql;
        /**
         * hitCount
         */
        private Boolean hitCount;
        /**
         * countId
         */
        private Object countId;
        /**
         * maxLimit
         */
        private Object maxLimit;
        /**
         * searchCount
         */
        private Boolean searchCount;
        /**
         * pages
         */
        private Integer pages;

    }
}
